package com.hikvision.cms.thread;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;


public class ThreadPool {
    public static void addWork(Runnable work) {
        executor.execute(work);
    }


     private static ExecutorService executor = new ThreadPoolExecutor(2, 8, 10L, TimeUnit.SECONDS, new LinkedBlockingQueue<>(200), new ThreadPoolExecutor.CallerRunsPolicy());
}

